Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@workday/canvas-kit-react-common
Advanced tools
A module of common utilities shared across canvas components
A module of common utilities shared across canvas components.
yarn add @workday/canvas-kit-react
or
yarn add @workday/canvas-kit-react-common
Includes:
None
This component extends the HTML div
element. All additional props that are passed to this
component that are valid HTML attributes will be rendered as part of the wrapper div
element. This
includes custom data-*
attributes such as data-test-id
to help facilitate automation testing.
anchorElement: Element | null
The reference element used to position the popper.
children: React.ReactNode | ((props: {placement: Placement}) => React.ReactNode)
The element used as the popper.
containerElement: Element
The element that contains the portal children when
portal
is true.
Default: document.body
open: boolean
Flag to determine whether to show the popper. When true, the popper is shown.
Default: true
placement: Placement
The placement of the popper relative to the
anchorElement
. Valid placements are:
Each placement can have a variation from this list:
Default: bottom
popperOptions: PopperOptions
Additional options passed to the
popper.js
instance.
portal: boolean
Flag to determine whether to use a portal for the popper. When false, the popper stays within the DOM hierarchy of it's parent. When true, the popper is attached to the
containerElement
.
Default: true
This provider includes all of the Canvas Providers below. This is the way most consumers should use the provider. This provider is required for our theming capabilities, so you can find more information in the theming documentation.
We strongly encourage you to use this in your application to wrap all Canvas components.
import * as React from 'react';
import {CanvasProvider} from '@workday/canvas-kit-react-common';
<CanvasProvider>{/* All your components containing any Canvas components */}</CanvasProvider>;
We provide a storybook decorator to wrap your
stories in a CanvasProvider
(including InputProvider
) automatically.
Add this decorator to your /.storybook/preview.js
configuration file to apply to all stories:
import {CanvasProviderDecorator} from '../utils/storybook';
export const decorators = [CanvasProviderDecorator];
Or, add it to stories individually:
import {CanvasProviderDecorator} from '../../../../utils/storybook';
export default {
title: 'MyComponent',
component: MyComponent,
decorators: [CanvasProviderDecorator],
};
// OR
MyStory.decorators = [CanvasProviderDecorator];
Theming documentation has its own README. You can find it here.
Bidirectionality is provided by Theming. You can find Theming documentation here.
FAQs
A module of common utilities shared across canvas components
We found that @workday/canvas-kit-react-common demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.